import axios from "@/tool/axios";
// 登录
export const login = (obj) => axios.post("login", obj)
// 左侧菜单栏
export const getMenus = (obj) => axios.get("menus", obj)
/* 用户列表渲染 */
export const getUsers = (obj) => axios.get("users", obj)
// 添加用户
export const postUsers = (obj) => axios.post("users", obj)
// 删除用户
export function delUsers(data) {
    return axios({
        url: `users/${data.id}`,
        method: 'DELETE',
        data,
    })
}
// 编辑用户
export const editUsers = (obj) => axios.put(`users/${obj.id}`, obj)
// export function editUsers(data) {
//     return axios({
//         url: `users/${data.id}`,
//         method: 'PUT',
//         data,
//     })
// }
// 修改用户状态
export const editStatus = (uId, type) => axios.put(`users/${uId}/state/${type}`)
